package com.jiang.daily.Q2595;

/**
 * @author Jiang
 * @version 1.0
 * @date 2025/02/20 18:56
 */
class Solution {
    public int[] evenOddBit(int n) {
        int[] res = new int[2];
        int index = 0;
        while (n != 0) {
            res[index] += 1 & n;
            n >>= 1;
            index ^= 1;
        }
        return res;
    }
}
